package org.zxp.designpattern.flyweight;

/**
 * @program: effectiveJava
 * @description:
 * @author: X-Pacific zhang
 * @create: 2019-08-24 13:41
 **/
public class Test {
    public static void main(String[] args){
        Service service1 = ServiceFactory.getService(ServiceFactory.ServiceType.ONE);
        Service service2 = ServiceFactory.getService(ServiceFactory.ServiceType.TWO);
        Service service3 = ServiceFactory.getService(ServiceFactory.ServiceType.THREE);
        service1.doRequest();
        service2.doRequest();
        service3.doRequest();
        Service service11 = ServiceFactory.getService(ServiceFactory.ServiceType.ONE);
        service11.doRequest();
    }
}
